You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[test] add fuzz targets for sequences of tbor commands and dispatcher - #787
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
The bootstrap session is an active Crypto-Officer session, and CO handshakes have only slot 0 available. Consequently every secondary CO SessionOpenInit reaches VaultSessionLimitReached here and immediately continues, so no finish-MAC or close operation below is ever exercised. Use the rotated CU fixture/credentials for the primary and secondary handles (CU has slots 1–7), or close the bootstrap CO and restructure the per-handle-limit check before opening secondaries.
The active bootstrap_rotated_co session already occupies the firmware's single CO slot, so this secondary CO SessionOpenInit always returns VaultSessionLimitReached (the same invariant is exercised in ddi/tbor/types/tests/commands/open_session.rs:352-372). Consequently every OpenSession operation continues here, file_handles remains empty, and none of the Phase 2 or close-session sequence logic is fuzzed. Use a session type/identity with spare capacity (for example CU), or restructure the bootstrap so the CO slot is free before opening the secondary session.
This wildcard converts ECC DriverError results into an ordinary request failure. For invalid session IDs or unsupported scopes, the later assertion expects false, so an I/O abort is silently accepted instead of being reported as the crash this fuzz target is meant to detect; the AES branch above and the other TBOR fuzz targets explicitly panic on DriverError. Preserve that arm before the wildcard.
This issue also appears on line 148 of the same file.
The reason will be displayed to describe this comment to others. Learn more.
🟢 Approval recommended
The new targets are registered consistently and their setup, validation, and cleanup paths match the existing TBOR contracts.
0 open findings
🧠 Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.